Rob´s BB-Kurs 2
© Robert Gerlach 2001
| SetBuffer BackBuffer() |
| Flip |
|
Graphics 640, 480 SetBuffer BackBuffer() Repeat Cls ; Dummes Zeug malen Flip Until KeyHit(1) |
| bildvariable = LoadImage("bild.bmp") |
| DrawImage bildvariable, x, y |
| MaskImage bildvariable, r, g, b |
| DrawBlock bildvariable, x, y |
|
; Zeichnet ein Bild mit transparenter Farbe auf den ganzen Bildschirm: TileImage bildvariable, x, y ; Zeichnet ein Bild ohne transparente Farbe auf den ganzen Bildschirm: TileBlock bildvariable, x, y |
| bildvariable = LoadAnimImage("bild.bmp", hoehe, breite, erstes_bild, bilder_anzahl) |
|
DrawImage bildvariable, x, y, frame DrawBlock bildvariable, x, y, frame TileImage bildvariable, x, y, frame TileBlock bildvariable, x, y, frame |

|
; BB unterstützt .png, .bmp und .jpg Bilder, die Demo nur .bmp ; Um auf den BackBuffer zu zeichnen schreibe man am Anfang des Programmes: SetBuffer BackBuffer() ; Will man auf den sichtbaren FrontBuffer zeichnen, schreibe man garnichts (weil Standardeinstellung) oder: SetBuffer FrontBuffer() ; Um die Buffer auszutauschen: Flip ; Ein einfaches Bild in den Speicher laden kann man mit: bildvariable = LoadImage("bild.bmp") ; Dieses Bild dann mit transparenter Farbe malen: DrawImage bildvariable, x, y ; Als Block, ohne transparente Farbe malen: DrawBlock bildvariable, x, y ; Auf dem ganzen Bildschirm "kacheln": TileImage bildvariable, x, y und TileBlock bildvariable, x, y ; Die transparente Farbe eines Bilder ändern: MaskImage bildvariable, r, g, b ; Ein Filmstreifen-Bild als Animation laden: bildvariable = LoadAnimImage("bild.bmp", hoehe, breite, erstes_bild, bilder_anzahl) ; Die jeweiligen Einzelbilder einer Animation kann man auswählen, indem man einfach die Framenummer hinten ranhängt: DrawImage bildvariable, x, y, frame DrawBlock bildvariable, x, y, frame TileImage bildvariable, x, y, frame TileBlock bildvariable, x, y, frame |